﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Model;
using Dal;
using System.Web.SessionState;
using easysql;
namespace Web.service
{
    /// <summary>
    /// MenuService 的摘要说明
    /// </summary>
    public class MenuService : BaseService<MenuModel>, IRequiresSessionState
    {
        private MenuDal dal = DalFactory.CreateMenuDal();
        private Object query(HttpContext context)
        {
            List<MenuModel> list = dal.IQuery(null,Restrain.Order("sequence"),Restrain.Order("id"));//查出所有menu
            return list;
        }

        private Object myMenuTree(HttpContext context)
        {
            UserModel user = GetSessionUserIfNotExistThrow(context);
            List<MenuModel> list = dal.QueryByUser(user);//查出所有menu
            return list;
        }

    }
}